<?php

/**
 * Encoding converter using mb_string
 *
 * @author tobias.vogel
 */
class Mailfetcher_Utf8Converter {

	public static function mbStringConvertToUtf8($text, $originalCharset) {
		
		if ($originalCharset === 'unknown-8bit' || $originalCharset === 'x-user-defined') {
			$originalCharset = "latin1";
		}
		return mb_convert_encoding($text, 'UTF-8', $originalCharset);
	}
}
